<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>MiXiM: simsignalwrap_t Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">MiXiM
   &#160;<span id="projectnumber">2.3</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('a00201.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a>  </div>
  <div class="headertitle">
<div class="title">simsignalwrap_t Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="simsignalwrap_t" -->
<p>Helper function to initialize signal change identifier on use and not on initializing static sections.  
 <a href="a00201.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="a00309_source.html">MiXiMDefs.h</a>&gt;</code></p>

<p><a href="a01021.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0cd6dc064fbacefdcbcb7bab6366af0e"></a><!-- doxytag: member="simsignalwrap_t::simsignalwrap_t" ref="a0cd6dc064fbacefdcbcb7bab6366af0e" args="(const char *const pSignalName)" -->
&#160;</td><td class="memItemRight" valign="bottom"><b>simsignalwrap_t</b> (const char *const pSignalName)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae2973c10941420fa7c60f3df329bd108"></a><!-- doxytag: member="simsignalwrap_t::simsignalwrap_t" ref="ae2973c10941420fa7c60f3df329bd108" args="(const simsignalwrap_t &amp;pCpy)" -->
&#160;</td><td class="memItemRight" valign="bottom"><b>simsignalwrap_t</b> (const <a class="el" href="a00201.html">simsignalwrap_t</a> &amp;pCpy)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">simsignal_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00201.html#aa01f017b96087bc252445206777e0080">initialize</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00201.html#ac0e7f28a74aad2569ccfa51b2f8486b5">operator simsignal_t</a> () const </td></tr>
<tr><td colspan="2"><h2><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3ca298b148783eba89d72134a55d485f"></a><!-- doxytag: member="simsignalwrap_t::ssChangeSignal" ref="a3ca298b148783eba89d72134a55d485f" args="" -->
volatile simsignal_t&#160;</td><td class="memItemRight" valign="bottom"><b>ssChangeSignal</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4235d46c336709e687bb1aced9983318"></a><!-- doxytag: member="simsignalwrap_t::sSignalName" ref="a4235d46c336709e687bb1aced9983318" args="" -->
const char *const&#160;</td><td class="memItemRight" valign="bottom"><b>sSignalName</b></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Helper function to initialize signal change identifier on use and not on initializing static sections. </p>
</div><hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="aa01f017b96087bc252445206777e0080"></a><!-- doxytag: member="simsignalwrap_t::initialize" ref="aa01f017b96087bc252445206777e0080" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">simsignal_t simsignalwrap_t::initialize </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>This function works like the cast operator but does a little bit more checks if we access the variable after a network rebuild!</p>
<p>This function should be used in the initialize methods of all modules where the signal will be used (emit, subscribe). </p>

<p>Referenced by <a class="el" href="a00080.html#a544bf3b2eecdf476feceed30bb6e4f72">DeciderUWBIRED::initFromMap()</a>, <a class="el" href="a00193.html#a02f43017e7f375fb12a3299f929f99d3">SimpleBattery::initialize()</a>, <a class="el" href="a00191.html#aac9612746afd57f4393658789d3c64fe">SensorApplLayer::initialize()</a>, <a class="el" href="a00033.html#a07bebc9788ff9ec28a8b4d3d1473d977">BatteryStats::initialize()</a>, <a class="el" href="a00223.html#a0fcaae9c3cefb73372b7290ff4d9092d">UWBIRMac::initialize()</a>, <a class="el" href="a00156.html#a4ad89047bebb99eaad2fd239cbc9e601">NetworkStackTrafficGen::initialize()</a>, <a class="el" href="a00217.html#a083fea2270d41c26495fbc8e2bbe95be">TrafficGen::initialize()</a>, <a class="el" href="a00025.html#a70f5ea30a9980d57b8384faed29ec3eb">BaseLayer::initialize()</a>, <a class="el" href="a00126.html#a2100ca7de5c5eedb3e7f0e11ca9fca14">LMacLayer::initialize()</a>, <a class="el" href="a00067.html#a24e7a48bd1d9036139c75b558ade4161">csma::initialize()</a>, <a class="el" href="a00027.html#a03030e439aaf030c83da6e71e8be2f80">BaseModule::initialize()</a>, and <a class="el" href="a00053.html#aad16a20e89c1415737abbebd2d2e4383">ConnectionManagerAccess::initialize()</a>.</p>
<div class="fragment"><pre class="fragment">                                 {
    <span class="keywordflow">if</span> (sSignalName != NULL &amp;&amp; (ssChangeSignal != SIMSIGNAL_NULL)) {
      <span class="keyword">const</span> <span class="keywordtype">char</span> *<span class="keyword">const</span> sRegSigName = cComponent::getSignalName(ssChangeSignal);
      <span class="keywordflow">if</span> (sRegSigName == NULL || strcmp(sSignalName, sRegSigName) != 0) {
        ssChangeSignal = SIMSIGNAL_NULL;
      }
    }
    <span class="keywordflow">return</span> (*<span class="keyword">this</span>);
  }
</pre></div>
</div>
</div>
<a class="anchor" id="ac0e7f28a74aad2569ccfa51b2f8486b5"></a><!-- doxytag: member="simsignalwrap_t::operator simsignal_t" ref="ac0e7f28a74aad2569ccfa51b2f8486b5" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">simsignalwrap_t::operator simsignal_t </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Cast operator to simsignal_t, we initialize the signal here if it is empty ;). </p>
<div class="fragment"><pre class="fragment">                                {
    <span class="keywordflow">if</span> (sSignalName != NULL &amp;&amp; ssChangeSignal == SIMSIGNAL_NULL) {
      ssChangeSignal = cComponent::registerSignal(sSignalName);
    }
    <span class="keywordflow">return</span> ssChangeSignal;
  }
</pre></div>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>D:/Projects/MiXiM/extsrc/mixim/src/base/utils/<a class="el" href="a00309_source.html">MiXiMDefs.h</a></li>
</ul>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="a00201.html">simsignalwrap_t</a>      </li>

    <li class="footer">Generated on Tue Mar 5 2013 21:26:33 for MiXiM by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
